#ifndef ACTORMARIO_H
#define ACTORMARIO_H

#pragma once

#include "Actor.h"
#include "SpriteMario.h"
#include "CollisionDetection.h"
#include "Sound.h"

#define VERTICAL_MAX 40

#define MARIO_STEP_NORMAL 1
#define MARIO_STEP_JUMP 4 //Nur Absprung

#define JUMP_SLOWDOWN_TIME 10

#define JUMP_PEAK_TIME 3

	enum Activity{stand, run, climbup, climbarrelDown, jump, jumpleft, jumpright};
	enum Direction{onPlace, left, right, up, down};

class ActorMario:public Actor{
private:
	SpriteMario* grafic;
	Sound* sound;
	Direction directionState;
	CollisionDetection* collision;
	int jumpcounter;
	int climbanimationdelay;
	Activity activity;
	void makedirection();
	void Jumping(Direction jumpdirection);

public:
	ActorMario(CL_GraphicContext gc);
	bool Stand();
	bool Jump();
	bool Jump(Direction dir);
	bool Run(bool newdirection);
	bool Climb(Direction dir);
	void dead();
	bool IsJumping();
	void hud(int lifes);

#ifdef SHOW_OUTLINES
	void drawLadders(CL_GraphicContext gc);
	void drawOutline(CL_GraphicContext gc);
#endif
	~ActorMario();
};

#endif